import React from 'react';
import { Layout, Menu } from 'antd';

import styles from './index.less'
import { Link } from 'umi';

const { Header, Content, Footer } = Layout;

function BasicLayout(props) {
    return (
        <Layout>
            <Header>
                <div className={styles.logo}>智慧厂区演示</div>
                <Menu
                    theme="dark"
                    mode="horizontal"
                    defaultSelectedKeys={['1']}
                    style={{ lineHeight: '64px' }}
                >
                    <Menu.Item key="1">
                        <Link to='/'>案例</Link>
                    </Menu.Item>
                </Menu>
            </Header>
            <Content style={{ padding: '0 50px' }}>
                <div style={{ background: '#fff',margin:'0 auto', padding: 24, maxWidth: 980, minHeight: 280 }}>
                    {props.children}
                </div>
            </Content>
            <Footer style={{ textAlign: 'center' }}>xxx</Footer>
        </Layout>
    );
}

export default BasicLayout;